import {Component, OnInit} from '@angular/core';
import {MenuService} from './menu.service';
import {Menu} from './menu';

@Component({
  selector: 'sung-app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css'],
  providers: [MenuService]
})

export class HomeComponent implements OnInit{
  title = '首页';
  menus = Menu[''];

  constructor(private menuService: MenuService){}

  getMenus(): void {
    this.menus = this.menuService.getMenus();
  }

  ngOnInit(): void {
    this.getMenus();
  }
}
